<html>
<head>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.dumpChildFrames();
    testRunner.setDumpConsoleMessages(true);
    testRunner.waitUntilDone();
}

window.addEventListener("message", e => {
  if (e.data === "PASS")
    return;
  document.querySelector('div').textContent = "FAIL: 'top.location' threw";
  if (window.testRunner)
    testRunner.notifyDone();
});
</script>
</head>
<body>
<iframe src="http://localhost:8000/security/frameNavigation/resources/iframe-that-performs-same-origin-top-navigation-without-user-gesture.html"></iframe>
<div></div>
</body>
</html>
